home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / params / main.bas < prev    next >
Encoding:
BASIC Source File  |  1994-10-16  |  989 b   |  40 lines

  1. Option Explicit
  2. '
  3. ' Program Constants
  4. '
  5.   '
  6.   '  Application Wide Parameter Constants
  7.   '
  8.     Global Const PRA_DATABASE = 1   ' Database name
  9.   '
  10.   '  Form Level Parameter Constants
  11.   '
  12.     Global Const PRF_TABLE = 1      ' Database Table
  13.     Global Const PRF_CRITERIA = 2   ' Search Criteria
  14.     Global Const PRF_INDEX = 3      ' Position Index
  15.     Global Const PRF_RESULT = 4     ' Search Results
  16.   '
  17.   ' Standard VB MsgBox Constants
  18.   '
  19.     Global Const MB_ICONEXCLAMATION = 48   ' Warning message
  20.  
  21. Sub Main ()
  22.   Dim sFileName As String
  23.   App.Title = "Parameter Passing Demo Program"
  24.   Do
  25.     sFileName = Trim$(InputBox$("Enter the full path for BIBLIO.MDB", "Database Location", "C:\VB\BIBLIO.MDB"))
  26.     If sFileName = "" Then
  27.       Exit Do
  28.     Else
  29.       If IsFile(sFileName, ISFILE_API) Then
  30.         SetAppParam sFileName, PRA_DATABASE
  31.         Exit Do
  32.       End If
  33.     End If
  34.   Loop
  35.   If sFileName <> "" Then
  36.     frmMain.Show
  37.   End If
  38. End Sub
  39.  
  40.